package err

import "gitee.com/yms-zero/go-library/ierr"

type baseErr struct {
	ierr.IError
	msg string
}

func newBaseErr(code int, err error) *baseErr {
	return &baseErr{
		IError: ierr.NewError(code, err, ierr.WithSkip(skip)),
		msg:    err.Error(),
	}
}

func newBaseErrWithMsg(code int, msg string) *baseErr {
	return &baseErr{
		IError: ierr.NewErrorWithMsg(code, msg, ierr.WithSkip(skip)),
		msg:    msg,
	}
}

func (b baseErr) Msg() string {
	return b.msg
}
